package com.example.card.implemention;

import com.example.card.Util;
import com.example.card.domain.card.ExpireDataLimit;

import java.time.LocalDate;

public class ExpireDate implements ExpireDataLimit {

    private LocalDate startDate;
    private LocalDate endDate;
    
    public ExpireDate(LocalDate startDate, LocalDate endDate) {
        this.startDate = startDate;
        this.endDate = endDate;
    }

    @Override
    public boolean isExpire() {
        return Util.inPeriod(LocalDate.now(),startDate,endDate);
    }
}
